export const formConfig = {
	inline: false,
	showBtn: true,
	labelPosition: 'right',
	labelWidth: '120px',
	column: [
		{
			label: '家庭地址',
			prop: 'address',
			maxlength: '50',
			showWordLimit: true,
			type: 'text',
			span: 24,
			rules: [{ required: true, message: '请输入家庭地址' }],
		},
		{
			label: '起始日期',
			prop: 'startDate',
			type: 'date',
			format: 'YYYY年MM月DD日',
			valueFormat: 'YYYY-MM-DD',
			rules: [{ required: true, message: '请选择起始日期' }],
			span: 24,
		},
		{
			label: '终止日期',
			prop: 'endDate',
			type: 'date',
			format: 'YYYY年MM月DD日',
			valueFormat: 'YYYY-MM-DD',
			rules: [{ required: true, message: '请选择终止日期' }],
			span: 24,
		},
	],
}

export const tableConfig = {
	stripe: true,
	border: true,
	columns: [
		{ label: '家庭地址', prop: 'address' },
		{ label: '起始日期', prop: 'startDate' },
		{ label: '终止日期', prop: 'endDate' },
		{
			label: '操作',
			prop: 'menu',
			width: 300,
			fixed: 'right',
		},
	],
}

export const api = {
	index: 'view_dpFamilyBedRecord_page',
	add: 'view_dpFamilyBedRecord_add',
	edit: 'view_dpFamilyBedRecord_edit',
	delete: 'view_dpFamilyBedRecord_del',
}
export const baseConfig = {
	pageName: '申请家庭床位记录',
	dictcodes: [],
	rowKey: 'id',
	addLabel: '新增',
	tipLabel: 'address',
	exportMqTopic: '/ning/export/',
	api,
	auth: api,
	menuBtn: [
		{
			icon: 'editor',
			label: '编辑',
			type: 'primary',
			operate: 'edit',
			auth: 'view_dpFamilyBedRecord_edit',
			text: true,
			show: true,
		},
		{
			icon: 'delete',
			label: '删除',
			type: 'danger',
			operate: 'delete',
			auth: 'view_dpFamilyBedRecord_del',
			text: true,
			show: true,
		},
	],
	dialogConfig: {
		width: '45%',
	},
	formConfig,
	tableConfig,
}
